package com.childguo.mapper;

import com.childguo.pojo.Stu;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface StuMapper {
    @Select("select * from stu where id = #{id}")
    Stu selectStuById(Integer id);

    @Select("select id from stu where id = #{id} and sname=#{sname}")
    Integer selectStuByStu(Stu stu);

    @Insert("insert into stu(id,sname) values(#{id},#{sname})")
    int insertStu(Stu stu);
}
